package com.example.a2032.db.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.example.a2032.entity.ImResultData;

import java.util.List;

@Dao
public interface BindersDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(ImResultData.BindersBean bindersBean);

    @Query("select * from bindersbean")
    LiveData<List<ImResultData.BindersBean>> loadAllBinders();


    @Insert(onConflict = OnConflictStrategy.REPLACE)
    List<Long> insert(List<ImResultData.BindersBean> users);

    @Query("Delete from bindersbean")
    void deleteAllBinders();

    @Query("select * from bindersbean where im==:id")
    ImResultData.BindersBean findBinders(String id);

}
